home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / vcredit / vcredit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  7.1 KB  |  223 lines

  1. /*
  2.  * Copyright (c) 1990, 1991 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/collab/vcrEdit/RCS/vcrEdit.h,v 0.29 92/09/08 14:28:28 drapeau Exp $ */
  25. /* $Log:    vcrEdit.h,v $
  26.  * Revision 0.29  92/09/08  14:28:28  drapeau
  27.  * Re-defined "MAX_FRAME" to take into account the new variable
  28.  * "FrameRate".  The old definition assumed NTSC frame rates only.
  29.  * 
  30.  * Revision 0.28  92/06/17  00:01:18  drapeau
  31.  * Added declaration of function "SetAsynchReadFunction()" to accommodate
  32.  * toolkit-independent asynchronous I/O.
  33.  * 
  34.  * Revision 0.27  92/06/15  14:44:53  drapeau
  35.  * Minor change: declared function prototype for "UpdateHeader()".
  36.  * 
  37.  * Revision 0.26  92/05/29  12:34:31  drapeau
  38.  * Modified code to track new name of the MAEstro "Selection" structure;
  39.  * it is now named "MAESelection".
  40.  * 
  41.  * Revision 0.25  92/05/13  23:54:53  drapeau
  42.  * Minor cosmetic changes to conform to coding standards.
  43.  * 
  44.  * Revision 0.24  91/09/29  16:13:38  lim
  45.  * Removed mySerialPort.
  46.  * 
  47.  * Revision 0.23  91/09/26  12:31:50  lim
  48.  * Added chosenHost as global.
  49.  * 
  50.  * Revision 0.22  91/09/24  22:00:47  lim
  51.  * 1. Combined 'vcrEditProtocol.h' into this file.
  52.  * 2. Used relative filenames for drivers.
  53.  * 
  54.  * Revision 0.21  91/08/28  13:04:39  lim
  55.  * Added preSearch and nextTLSelection for implementation of Presearching.
  56.  * 
  57.  * Revision 0.20  91/08/24  18:00:22  lim
  58.  * Added diagMode.
  59.  * 
  60.  * Revision 0.19  91/08/23  17:23:24  lim
  61.  * Included PlayerStatus.h instead of NECDriver.h
  62.  * 
  63.  * Revision 0.18  91/08/21  10:44:05  lim
  64.  * Added new variable, mySerialPort, to denote serial port setting on
  65.  * options panel.
  66.  * 
  67.  * Revision 0.17  91/08/17  20:49:58  lim
  68.  * OpenPanel now called Browse.
  69.  * 
  70.  * Revision 0.16  91/08/16  12:33:01  lim
  71.  * OpenPanel header file included.
  72.  * 
  73.  * Revision 0.15  91/08/11  18:45:43  lim
  74.  * Changed return type of FileLoad() from int to void.
  75.  * 
  76.  * Revision 0.14  91/08/09  16:42:10  lim
  77.  * Included OpenPanel.
  78.  * 
  79.  * Revision 0.13  91/08/09  11:05:09  lim
  80.  * Moved 'NECDriver.h' to 'videoObjects.c'
  81.  * 
  82.  * Revision 0.12  91/08/08  16:27:30  lim
  83.  * 1. speedStg is now an array of integers.
  84.  * 2. MaxHeaderLength define.
  85.  * 3. currTape is now an array MaxHeaderLength long.
  86.  * 4. Added instance pointer to each public function call.
  87.  * 5. currentAudio is used to denote current audio setting in edit list.
  88.  * 
  89.  * Revision 0.11  91/07/20  11:42:59  lim
  90.  * Added data structures for audio and speed settings.
  91.  * 
  92.  * Revision 0.10  91/07/16  16:15:42  lim
  93.  * Initial revision.
  94.  *  */
  95.  
  96. #ifndef _VCREditHeader_
  97. #define _VCREditHeader_
  98.  
  99. /* System files */
  100. #include <errno.h>
  101. #include <stdio.h>
  102. #include <sys/param.h>
  103. #include <sys/types.h>
  104. #include <sys/stat.h>
  105. #include <xview/xview.h>
  106. #include <xview/font.h>
  107. #include <xview/panel.h>
  108. #include <xview/fullscreen.h>
  109. #include <xview/notice.h>
  110. #include <xview/sel_attrs.h>
  111. #include <xview/textsw.h>
  112. #include <xview/xv_xrect.h>
  113. #include <gdd.h>
  114.  
  115. /* Other header files */
  116. #include "vcrEdit_ui.h"
  117. #include "Sender.h"
  118. #include "Receiver.h"
  119. #include <getopt.h>
  120. #include <videoObj.h>
  121. #include <PlayerStatus.h>
  122. #include <Browse.h>
  123.  
  124.  
  125. /* Definitions used in vcrEdit files */
  126. #define MAX_LISTSIZE 1000
  127. #define MAX_LABELSIZE 22
  128. #define MAX_FRAME (8 * 3600 * FrameRate)                /* 8 hours worth of frames */
  129. #define MAX_PATHLENGTH 256
  130. #define MAX_HOSTNAME 256
  131. #define MaxHeaderLength 10
  132. #define LOAD 0
  133. #define SAVE 1
  134.  
  135. enum AudioType {Stereo, Right, Left, Mute};                /* Different audio settings available for each edit */
  136.  
  137.  
  138. /* Command line variables */
  139. int receiverPort;                            
  140. char* startFilename;                                    
  141. char hostname[MAX_HOSTNAME];                        
  142.  
  143. /* Variables used for making edits */
  144. int lines;                                /* number of lines in the edit list */
  145. int editnum;                                /* the current selection in the edit list */
  146. int change;                                /* indicates if unsaved changes exist in the edit list */
  147. int clearframe;                                /* determines if the frame/chapter textfield is to be cleared*/
  148. int search;                                /* flag to indicate if a notify procedure is to be executed. 
  149.                                        This is necessary because a textfield notify procedure 
  150.                                        is executed twice for each key depressed (possibly a XView 
  151.                                        bug */
  152. extern char    currentFilename[256];                    /* Name of currently-opened file */
  153.  
  154. /* Arrays to store edit information */
  155. char startframe[MAX_LISTSIZE][12];
  156. char endframe[MAX_LISTSIZE][12];    
  157. char label[MAX_LISTSIZE][MAX_LABELSIZE+1];         
  158. enum AudioType audioStg[MAX_LISTSIZE];
  159. int speedStg[MAX_LISTSIZE];
  160.  
  161. /* Networking stuff */
  162. Sender*        sender;
  163. Receiver*    receiver;
  164. char        deviceName[MaxNameLength];                /* Name of device currently used */
  165. VideoObject*    myVideo;                        /* Current video object */
  166. static char    chosenHost[MAX_HOSTNAME];                /* Current (chosen from options panel) network host */
  167. int        currentAudio;                        /* Current audio setting */
  168. enum Boolean    diagMode;                        /* Flag : whether diagnostic messages should be printed */
  169. enum Boolean    preSearch;                        /* Flag : whether presearching should be done */
  170.  
  171. /* XView stuff */
  172. vcrEdit_window1_objects            *vcrEdit_window1;
  173. vcrEdit_optionsPopup_objects         *vcrEdit_optionsPopup;
  174. vcrEdit_editPopup_objects         *vcrEdit_editPopup;
  175. vcrEdit_previewPopup_objects         *vcrEdit_previewPopup;
  176. vcrEdit_infoPopup_objects         *vcrEdit_infoPopup;
  177.  
  178. /* Fonts */
  179. Xv_font *font;    
  180.  
  181. /* Indexing variables */
  182. FILE* indexFp;
  183. int indexing;
  184.  
  185. static char vcrEdithrcsid[] = "$Header: /Source/Media/collab/vcrEdit/RCS/vcrEdit.h,v 0.29 92/09/08 14:28:28 drapeau Exp $";
  186. void Quit();
  187. void SetIndexActive();
  188. void EditDone();
  189. void DisplayError();
  190. void PrintDiagnostics();
  191. Menu_item FileLoad();
  192. void ConvertToTime();
  193. void SetPort();
  194. void PlayEdit();
  195. VideoObject* DevInit();
  196. int OpenHandler();
  197. int SaveHandler();
  198. void SetPlayer();
  199. void UpdateHeader (char* documentName, int modified);
  200. void SetAsynchReadFunction();
  201.  
  202.  
  203. /* Defined in vcrEditProtocol.c */
  204.  
  205. void InitNetwork();
  206. void OpenDoc();
  207. void SetSelection();
  208. void PerformSelection();
  209. char ** GetDoc();
  210. MAESelection* GetSelection();
  211. void HaltSelection();
  212. void PauseSelection();
  213. void ResumeSelection();
  214. void HideApplication();
  215. void ShowApplication();
  216. IconData* GetAppIcon();
  217.  
  218. Sender* sender;
  219. Receiver* receiver;
  220.  
  221.  
  222. #endif
  223.